Also beware if its a linux server then the getdate command add some rubbish to the end, still not fixed as far as i know
To remove seconds, you strings.scr and figure it out from there lol
Also beware if its a linux server then the getdate command add some rubbish to the end, still not fixed as far as i know
To remove seconds, you strings.scr and figure it out from there lol
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive
Okay! Great thanks to you all! as always.
I tried to combine them into the one huddraw string. Is it possible to call both, so that they sit on the same line, and if so whats the operator I need to use? Is it a "+" ":" etc? Tried them, and didn't work. As below
main:
while(1)
{
local.time = gettime(0) + "AEDT"
local.date = getdate(0)
huddraw_align 15 right top
huddraw_rect 15 -125 75 0 0
huddraw_font 15 "facfont-20"
huddraw_alpha 15 1
huddraw_color 15 1 1 1
huddraw_string 15 local.date + local.time ??
wait 1
}
end
Cheers
hmmm ,,,,,,,,,,
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm,,,,
this won't work , here is the right way :
main: local.date = getdate(0) while(1) { local.time = gettime(0) local.time = waitexec global/strings.scr::Left local.time.size-3 local.time huddraw_align 15 right top huddraw_rect 15 -125 75 0 0 huddraw_font 15 "facfont-20" huddraw_alpha 15 1 huddraw_color 15 1 1 1 huddraw_string 15 (local.time + " : " + local.date) wait 59 //that is what i call tricky } end
didn't test.
oh ,btw , get ur self a modder![]()
Few things to note aswell
- gettime gets the local time from the server, so you dnt need to adjust for timezones, as long as the server time is correct.
- Depending on the OS of the server Linux or Windows, you are best off combining the string first into the one variable before displaying it using huddraw, linux servers dnt like it when you try to parse a const.string through it.
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive
Thank you ladz! And indeed Ryback, I should. I am mere mortal amongst gods!
I couldn't load that above awesome code properly, btw. Server didn't like it and gave below error (strings.scr is up-to-date).
I will try and load the date/clock scripts separately as a fix.
Thanks again.
Code:local.time = waitexec global/strings.scr::Left local.time.size-3 local.time (custom/clock/clock.scr, 6) local.time = waitexec global/strings.scr::Left local.time.size-3 ^ ^~^~^ Script file compile error: Couldn't parse 'custom/clock/clock.scr' exec custom/clock/clock.scr (global/dmprecache.scr, 212) ^ ^~^~^ Script Error: Script 'custom/clock/clock.scr' was not properly loaded exec custom/clock/clock.scr (global/dmprecache.scr, 212) ^ ^~^~^ Script Error: Script 'custom/clock/clock.scr' was not properly loaded
Make sure you have global/strings.scr
and its non capital Left,
waitexec global/strings.scr::left local.time.size-3 local.time
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive
nah , it is ! check reborn 8 pk3
you sure you looking at latest version ??
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive
strings :P
version i use is dated 20/10/2011
Purple's Playground
OBJ : 103.29.85.127:12203
xfire: purpleelephant1au
email: purpleelephant1au@gmail.com
skydrive: PurpleElephantSkydrive